#include <stdio.h>
#include <event.h>
/**
 * libevent
 *      网络事件库 跨平台 支持多种多路IO复用
 *      核心：以事件驱动（触发）回调
 *      安装 ： 下载  => 解压 =>sudo ./configure => sudo make => sudo make install
 *      error while loading shared libraries: libevent-2.1.so.7: cannot open shared object file: No such file or directory
 *      解决方案    sudo ln -s /usr/local/lib/libevent-2.1.so.7 /usr/lib/libevent-2.1.so.7
 *
 *      gcc main.c -o hello -levent
 * @return
 */
int main()
{
    char ** methods = event_get_supported_methods();//获取libevent后端支持的方法
    int i =0;
    for(i = 0;methods[i] != NULL ;i++)
    {
        printf("%s\n",methods[i]);
    }
    struct event_base * base = event_base_new();
    printf("now : %s\n", event_base_get_method(base));
    return 0;
}
